/**
 * 
 */
package com.alphasystem.commerce.common.valuelist;

import java.io.Serializable;

/**
 * @author sali
 * 
 */
public class ValueListObject implements Serializable {

	private static final long serialVersionUID = 146474274985429124L;

	protected String name;

	protected String value;

	public ValueListObject() {
	}

	public ValueListObject(String name, String value) {
		this.name = name;
		this.value = value;
	}

	@Override
	public boolean equals(Object obj) {
		boolean result = false;
		if (obj instanceof ValueListObject) {
			ValueListObject other = (ValueListObject) obj;
			result = name.equals(other.getName())
					&& value.equals(other.getValue());
		}
		return result;
	}

	public String getName() {
		return name;
	}

	public String getValue() {
		return value;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return name + ":" + value;
	}

}
